<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">

		<title>编辑用户信息</title>
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">
		<link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
		<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script>
	</head>

	<body class="content1">
		<div class="header">
			<h1 class="page-title">
				编辑用户信息
			</h1>
		</div>

		<ul class="breadcrumb">
			<li>
				<a href="index.html">用户功能管理</a>
				<span class="divider">/</span>
			</li>
			<li class="active">
				编辑用户信息
			</li>
		</ul>

		<div class="container-fluid">
			<div class="row-fluid">
				<form method="post" action="<%=basePath%>film/user/editUser">
					<div class="btn-toolbar">
						<input type="submit" class="btn btn-primary" value="确认修改">
						<a href="<%=basePath%>film/user/userlist" class="btn">取消</a>

					</div>

					<div class="well">
						<div class="tab-pane active in">
							<label>
								用户名：
							</label>
							<input type="hidden" name="userid" value="${item.userid}" />
						
							<input type="text" name="username" value="${item.username}"/>
							<label>
								用户密码：
							</label>
							<input type="text" name="password" maxlength="20"
								value="${item.password}">
							<label>
								真实姓名：
							</label>
							<input type="text" name="usertruename" value="${item.usertruename}"
								maxlength="20">
							<label>
								TEL：
							</label>
							<input type="text" name="tel" value="${item.tel}" maxlength="30">
							<label>
								Email：
							</label>
							<input type="text" name="email" value="${item.email}" maxlength="30">
							<label>
								角色：
							</label>
								<select name="ftId">
									<c:forEach items="${rolelist}" var="type">										
										<option value="${type.roleid}" 
											<c:if test="${type.roleid eq item.roleid}">
											selected="selected" 
											</c:if>
											/>
											${type.rolename}
										</option>					
									</c:forEach>
								</select>
							<label>
								会员：
							</label>
							<select name="member">
								<c:choose>
									<c:when test="${item.member==\"1\"}">
										<option value="1" selected="selected">会员</option>
										<option value="0">非会员</option>		
									</c:when>
									<c:otherwise>
										<option value="1">会员</option>
										<option value="0" selected="selected">非会员</option>	
									</c:otherwise>
								</c:choose>
							</select>
							<label>
								用户状态：
							</label>
							<select name="userstate">
								<c:choose>
									<c:when test="${item.userstate==\"1\"}">
										<option value="1" selected="selected">正常</option>
										<option value="0">锁定</option>		
									</c:when>
									<c:otherwise>
										<option value="1">正常</option>
										<option value="0" selected="selected">锁定</option>	
									</c:otherwise>
								</c:choose>
							</select>
							<div style="color: red">
								${msg}
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
